home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PCGUIA 127
/
PC Guia 127.iso
/
Software
/
Produtividade
/
OpenOffice.org 2.0.1
/
openofficeorg1.cab
/
HelloWorld.java
< prev
next >
Wrap
Text File
|
2005-05-18
|
623b
|
23 lines
import com.sun.star.script.provider.XScriptContext;
import com.sun.star.uno.UnoRuntime;
import com.sun.star.text.XTextDocument;
import com.sun.star.text.XTextRange;
import com.sun.star.text.XText;
/**
* HelloWorld class
*
*/
public class HelloWorld {
public static void printHW(XScriptContext xSc) {
// getting the text document object
XTextDocument xtextdocument = (XTextDocument) UnoRuntime.queryInterface(
XTextDocument.class, xSc.getDocument());
XText xText = xtextdocument.getText();
XTextRange xTextRange = xText.getEnd();
xTextRange.setString( "Hello World (in Java)" );
}// printHW
}